﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ledict.ConditionExtract.DAL;
using System.Data;
using Ledict.ConditionExtract.Model;

namespace Ledict.ConditionExtract.BLL
{
    public class ExpressGroupSituationBLL
    {
        ExpressGroupSituationDAL del = new ExpressGroupSituationDAL();


        public string GetES_SituationIdsById(string ES_IDs)
        {
            return del.GetES_SituationIdsById(ES_IDs);
        }

        public string GetES_IDsByCCId(string CC_ID, int? ES_IsMakeUp, string AffirmIdeaResult)
        {
            return del.GetES_IDsByCCId(CC_ID, ES_IsMakeUp, AffirmIdeaResult);
        }

        /// <summary>
        /// 获取单一节点的msid
        /// </summary>
        /// <param name="ccId"></param>
        /// <returns></returns>
        public string GetSingleNodeMSId(string ccId)
        {
            return del.GetSingleNodeMSId(ccId);
        }



        /// <summary>
        /// 界面根据构成认定获取单一节点的msid
        /// </summary>
        /// <param name="CC_ID"></param>
        /// <param name="ES_IsMakeUp"></param>
        /// <param name="AffirmIdeaResult"></param>
        /// <returns></returns>
        public string GetSingleNodeId(string CC_ID, int? ES_IsMakeUp, string AffirmIdeaResult)
        {
            return del.GetSingleNodeId(CC_ID, ES_IsMakeUp, AffirmIdeaResult);
        }

            public string GetES_IDsByCCID(string CC_ID, string AffirmIdeaResult)
        {
            return del.getES_IDsByCCId(CC_ID, AffirmIdeaResult);
        }

        public string getES_IDsByCCId1(string ccId)
        {
            return del.getES_IDsByCCId1(ccId);
        }

        public DataTable getES_IDsByCCId2(string ccId, string AffirmIdeaResult)
        {
            return del.getES_IDsByCCId2(ccId, AffirmIdeaResult);
        }
        public string getES_IDsByCCId4(string ccId, string AffirmIdeaResult)
        {
            return del.getES_IDsByCCId4(ccId, AffirmIdeaResult);
        }

        public string getES_IDsByCCId3(string ccId, int isMatch, string AffirmIdeaResult)
        {
            return del.getES_IDsByCCId3(ccId, isMatch, AffirmIdeaResult);
        }
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataTable GetList(string ES_SituationIds)
        {
            return del.GetList(ES_SituationIds);
        }


        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataTable GetALLList()
        {
            return del.GetALLList();

        }

        public DataTable GetALLCaseCauseList()
        {
            return del.GetALLCaseCauseList();
        }
        public DataTable GetMatchSituation()
        {
            return del.GetMatchSituation();
        }

        public bool UpdateMatchSituation(string SituationID, string CauseGroupID)
        {

            return del.UpdateMatchSituation(SituationID, CauseGroupID);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataTable GetCaseCauseAutoSource()
        {
            return del.GetCaseCauseAutoSource();

        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        /// <param name="parentId">父节点</param>
        /// <param name="ccNodeTypes">节点类型列表</param>
        /// <param name="isHasParentId">查询结果是否包括父节点（默认包括）</param>
        /// <returns></returns>
        public DataTable GetCaseCauseAutoSource(string parentId, IList<int> ccNodeTypes, bool isHasParentId = true)
        {
            return del.GetCaseCauseAutoSource(parentId, ccNodeTypes, isHasParentId);

        }

        /// <summary>
        /// 获得批量数据列表
        /// </summary>
        /// <param name="parentId">父节点</param>
        /// <param name="ccNodeTypes">节点类型列表</param>
        /// <param name="isHasParentId">查询结果是否包括父节点（默认包括）</param>
        /// <returns></returns>
        public DataTable GetCaseCauseBatchSource(string parentId, IList<int> ccNodeTypes, bool isHasParentId = true)
        {
            return del.GetCaseCauseBatchSource(parentId, ccNodeTypes, isHasParentId);

        }

    }
}
